#能够对任意个数作单一计算 + - * /
def h():
    he = float(L[0])
    for i in range(1,len(L)):
        he += float(L(i))
    print(he)

def sh():
    cha = float(L[0])
    for i in range(1,len(L)):
        cha -= float(L(i))
    print(cha)

def shan():
    shang = float(L[0])
    for i in range(1,len(L)):
        shang /= float(L[i])
    print(shang)
        
def j():
    ji = float(L[0])
    for i in range(1,len(L)):
        ji *= float(L[i])
    print(ji)

L = []
while True:
    x = input('请输入要计算的数(输回车结束)：')
    if x == "":
        break
    L.append(x)

type = input('选择计算类型 + - * / ')

if type == '+':
    h()
elif type == '-':
    sh()
elif type == '*':
    j()
elif type == '/':
    shan()
else:
    print('输入错误的计算符')
